import { debounce } from "../_utils"
import { useCallback } from "react"

const useDebounce = (func:Function, wait:number)=>{
 const debounceFunc =  useCallback(debounce(func, wait), [])
  return debounceFunc
}
export default useDebounce